package com.lenovo.hawk.service.impl;

import com.lenovo.hawk.dao.master.MasterTestMapper;
import com.lenovo.hawk.dao.slave.SlaveTestMapper;
import com.lenovo.hawk.service.MybatisTestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional(readOnly = true)
public class MybatisTestServiceImpl implements MybatisTestService {
    @Autowired
    SlaveTestMapper slaveTestMapper;
    @Autowired
    MasterTestMapper masterTestMapper;

    @Override
    public Integer findAllByMaster() {
        return masterTestMapper.findAll();
    }

    @Override
    public Integer findAllBySlave() {
        return slaveTestMapper.findAll();
    }
}
